<script lang="jsx" setup>
import dayjs from 'dayjs';
import { ref } from 'vue';

const tableRef = ref(null);
const searchParams = ref({});
const column = [
  {
    key: 'dataIndex',
    dataIndex: 'dataIndex',
    title: '序号',
    width: 70,
    align: 'center',
    checked: true,
    ellipsis: true
  },
  {
    key: 'delivDate',
    dataIndex: 'delivDate',
    title: '计划交期',
    width: 120,
    align: 'center',
    checked: true,
    ellipsis: true,
    customRender: ({ record }) => {
      return dayjs(record.delivDate).format('YYYY-MM-DD HH:mm:ss');
    }
  },
  {
    key: 'qty',
    dataIndex: 'qty',
    title: '计划数量',
    width: 120,
    align: 'center',
    checked: true,
    ellipsis: true
  },
  {
    key: 'backupQty',
    dataIndex: 'backupQty',
    title: '计划备品数量',
    width: 150,
    align: 'center',
    checked: true,
    ellipsis: true
  },
  {
    key: 'workQty',
    dataIndex: 'workQty',
    title: 'WIP数量',
    width: 120,
    align: 'center',
    checked: true,
    ellipsis: true
  },
  {
    key: 'invInQty',
    dataIndex: 'invInQty',
    title: '入库数量',
    width: 120,
    align: 'center',
    checked: true,
    ellipsis: true
  }
];
</script>

<template>
  <Table
    ref="tableRef"
    v-model:searchParams="searchParams"
    :column="column"
    :show-row-selection="false"
    auto-generate-uuid
    row-key="screenId"
    :scroll="{ y: 'auto' }"
    :is-init-get-data="false"
    url="/qms/scrscreen/screenInfo/pageList"
    class="h-full"
    :is-pagination="false"
  ></Table>
</template>

<style lang="scss" scoped></style>
